import pandas as pd


class DataLoader:
    @staticmethod
    def load_fabric_spectra():
        spectra = pd.read_csv("data/data_fzp/spectra505.csv", header=None).values
        label = pd.read_csv("data/data_fzp/labels505.csv", header=None).values
        wave = pd.read_csv("data/data_fzp/wave.csv", header=None).values.squeeze()
        spectra = spectra[:, 1600:3110]
        wave = wave[1600:3110]
        return spectra, label, wave

    @staticmethod
    def load_peach_spectra():
        xx = pd.read_csv("data/data_yali/spectra495.csv", header=None)
        xx = xx.iloc[:, 1:].values
        yy = pd.read_csv("data/data_yali/target495.csv", header=None).values
        wave = pd.read_csv("data/data_yali/wave.csv", header=None)
        wave = wave.iloc[1:].values.squeeze()
        return xx, yy, wave

